package com.young.springdemo.service.mediator;

//抽象同事类
public abstract class Compoment {
    protected Mediator mediator;

    //setter方法注入
    public void setMediator(Mediator mediator) {
        this.mediator = mediator;
    }

    //转发调用
    public  void changed(){
        mediator.componentChanged(this);
    }

    public abstract void update();


}
